<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>支付成功!</title>
 <script src="/static/js/vue-2.5.16.js"></script>
    <script type="text/javascript" src="/static/js/axios-0.18.0.min.js"></script>
</head>
<body>
<div class="success">
    <p><b>订单支付成功</b></p>
<!--    <p>您的订单已成功支付，支付宝交易号：{{}}</p>-->
    <a href="http://www.meiduo.site:8080/orders.html">返回订单页面</a>
</div>
</body>
<script>
    var vm = new Vue({
        el:'.success',
        data: {
            host:'http://www.meiduo.site:8000',
            trade_id: '',
            username: sessionStorage.username || localStorage.username,
            token: sessionStorage.token || localStorage.token,
        },
        mounted:function () {
            axios.put(this.host+'/payment/callback/'+document.location.search,{}, {
                        responseType: 'json',
                        withCredentials:true
                    })
                    .then(response => {
                        this.trade_id = response.data.trade_id;
                    })
                    .catch(error => {
                        console.log(error);
                    })
        }
    })


</script>


</html>